<!--#include("header.html")-->
<!--@if($member_info->member_srl)-->
    <!--%import("filter/update_member.xml")-->
<!--@else-->
    <!--%import("filter/insert.xml")-->
<!--@endif-->
<!--%import("css/member_admin.css")-->

<!--// datepicker javascript plugin load -->
<!--%load_js_plugin("ui.datepicker")-->
<!--%load_js_plugin("filebox")-->

<form id="fo_insert_member" action="./" method="get" onsubmit="return procFilter(this, insert)">
    <input type="hidden" name="page" value="{$page}" />
    <input type="hidden" name="member_srl" value="{$member_info->member_srl}" />
    <input type="hidden" name="signature" value="{htmlspecialchars($member_info->signature)}" />
    <!--@if($member_info->member_srl)-->
    <input type="hidden" name="user_id" value="{htmlspecialchars($member_info->user_id)}" />
    <!--@end-->


    <h4 class="xeAdmin">{$lang->member_default_info}</h4>
    <table cellspacing="0" class="rowTable">
    <tr>
        <th scope="row"><div>{$lang->user_id}</div></th>
        <td class="wide">
            <!--@if($member_info->member_srl)-->
            {htmlspecialchars($member_info->user_id)}
            <!--@else-->
            <input type="text" name="user_id" value="" class="inputTypeText" />
            <p>{$lang->about_user_id}</p>
            <!--@end-->
        </td>
    </tr>
    <tr class="row2">
        <th scope="row"><div>{$lang->password}</div></th>
        <td>
            <input type="text" name="password" value="" class="inputTypeText" />
        </td>
    </tr>
    <tr>
        <th scope="row"><div>{$lang->user_name}</div></th>
        <td>
            <input type="text" name="user_name" value="{htmlspecialchars($member_info->user_name)}" class="inputTypeText" />
            <p>{$lang->about_user_name}</p>
        </td>
    </tr>
    <tr class="row2">
        <th scope="row"><div>{$lang->nick_name}</div></th>
        <td>
            <input type="text" name="nick_name" value="{htmlspecialchars($member_info->nick_name)}" class="inputTypeText" />
            <p>{$lang->about_nick_name}</p>
        </td>
    </tr>
    <tr>
        <th scope="row"><div>{$lang->email_address}</div></th>
        <td>
            <input type="text" name="email_address" value="{htmlspecialchars($member_info->email_address)}" class="inputTypeText" />
        </td>
    </tr>
    <tr class="row2">
        <th scope="row"><div>{$lang->homepage}</div></th>
        <td>
            <input type="text" name="homepage" value="{htmlspecialchars($member_info->homepage)}" class="inputTypeText"/>
            <p>{$lang->about_homepage}</p>
        </td>
    </tr>
    <tr>
        <th scope="row"><div>{$lang->blog}</div></th>
        <td>
            <input type="text" name="blog" value="{htmlspecialchars($member_info->blog)}" class="inputTypeText" />
        </td>
    </tr>
    <tr class="row2">
        <th scope="row"><div>{$lang->birthday}</div></th>
        <td>
            <input type="hidden" name="birthday" id="date_birthday" value="{$member_info->birthday}" />
            <input type="text" class="inputDate" value="{zdate($member_info->birthday,'Y-m-d')}" readonly="readonly" />
            <p>{$lang->about_birthday}</p>
        </td>
    </tr>
    <tr>
        <th scope="row"><div>{$lang->allow_mailing}</div></th>
        <td>
            <input type="checkbox" name="allow_mailing" value="Y" <!--@if($member_info->allow_mailing!='N')-->checked="checked"<!--@end-->/>
            {$lang->about_allow_mailing}
        </td>
    </tr>
    <tr class="row2">
        <th scope="row"><div>{$lang->allow_message}</div></th>
        <td>
            <select name="allow_message">
                <!--@foreach($lang->allow_message_type as $key => $val)-->
                <option value="{$key}" <!--@if($member_info->allow_message == $key)-->selected="selected"<!--@end-->>{$val}</option>
                <!--@end-->
            </select>
            <p>{$lang->about_allow_message}</p>
        </td>
    </tr>
    <!--@if($member_srl && $editor)-->
    <tr>
        <th scope="row"><div>{$lang->signature}</div></th>
        <td>{$editor}</td>
    </tr>
    <!--@end-->
    <tr class="row2">
        <th scope="row"><div>{$lang->denied}</div></th>
        <td>
            <input type="checkbox" name="denied" value="Y" <!--@if($member_info->denied=='Y')-->checked="checked"<!--@end-->/>
            <p>{$lang->about_denied}</p>
        </td>
    </tr>
    <tr>
        <th scope="row"><div>{$lang->limit_date}</div></th>
        <td>
            <input type="hidden" name="limit_date" id="date_limit_date" value="{$member_info->limit_date}" />
            <input type="text" class="inputDate" value="{zdate($member_info->limit_date,'Y-m-d')}" readonly="readonly" />
            <p class="clear">{$lang->about_limit_date}</p>
        </td>
    </tr>
    <tr class="row2">
        <th scope="row"><div>{$lang->is_admin}</div></th>
        <td>
            <input type="checkbox" name="is_admin" value="Y" <!--@if($member_info->is_admin=='Y')-->checked="checked"<!--@end-->/>
            <p>{$lang->about_is_admin}</p>
        </td>
    </tr>
    <tr>
        <th scope="row"><div>{$lang->description}</div></th>
        <td>
            <textarea name="description" class="inputTypeTextArea fullWidth">{htmlspecialchars($member_info->description)}</textarea>
            <p>{$lang->about_member_description}</p>
        </td>
    </tr>
    <tr class="row2">
        <th scope="row"><div>{$lang->group}</div></th>
        <td>
            <!--@foreach($group_list as $key=>$val)-->
                <input type="checkbox" name="group_srl_list" value="{$key}" id="group_{$key}" <!--@if($member_info->group_list[$key])-->checked="checked"<!--@end--> class="checkbox" />
                <label for="group_{$key}">{$val->title}</label>
            <!--@end-->
            <p>{$lang->about_group}</p>
        </td>
    </tr>
    </table>

    <!--@if($extend_form_list)-->

    <h4 class="xeAdmin">{$lang->member_extend_info}</h4>
    <table cellspacing="0" class="rowTable">
    <!--@foreach($extend_form_list as $key => $val)-->
        <!--@if($val->is_active=='Y')-->
    <tr class="row{$cycle_idx}">
        <th scope="row"><div>
            {htmlspecialchars($val->column_title)}
            <!--@if($val->required=='Y')-->*<!--@end-->
            <div class="publicItem">
                <input type="checkbox" class="checkbox" name="open_{$val->column_name}" <!--@if($val->is_opened)-->checked="checked"<!--@end--> value="Y" id="open_{$val->column_name}" />
                <label for="open_{$val->column_name}">{$lang->public}</label>
            </div>
        </div></th>
        <td class="wide">
            <!--// 일반 text -->
            <!--@if($val->column_type == 'text')-->
                <input type="text" name="{$val->column_name}" value="{htmlspecialchars($val->value)}" class="inputTypeText w400" />

            <!--// 홈페이지 주소 -->
            <!--@elseif($val->column_type == 'homepage')-->
                <input type="text" name="{$val->column_name}" value="{htmlspecialchars($val->value)}" class="inputTypeText w400" />

            <!--// Email 주소 -->
            <!--@elseif($val->column_type == 'email_address')-->
                <input type="text" name="{$val->column_name}" value="{htmlspecialchars($val->value)}" class="inputTypeText w400" />

            <!--// 전화번호 -->
            <!--@elseif($val->column_type == 'tel')-->
                <input type="text" name="{$val->column_name}" value="{htmlspecialchars($val->value[0])}" size="4" class="inputTypeText" />-
                <input type="text" name="{$val->column_name}" value="{htmlspecialchars($val->value[1])}" size="4" class="inputTypeText" />-
                <input type="text" name="{$val->column_name}" value="{htmlspecialchars($val->value[2])}" size="4" class="inputTypeText" />

            <!--// textarea -->
            <!--@elseif($val->column_type == 'textarea')-->
                <textarea name="{$val->column_name}" class="inputTypeTextArea w400">{htmlspecialchars($val->value)}</textarea>

            <!--// 다중 선택 -->
            <!--@elseif($val->column_type == 'checkbox')-->
                <!--@if($val->default_value)-->
                    <!--@foreach($val->default_value as $v)-->
                        <input type="checkbox" name="{$val->column_name}" value="{htmlspecialchars($v)}" <!--@if(is_array($val->value)&&in_array($v, $val->value))-->checked="checked"<!--@end-->/>    {$v}
                    <!--@end-->
                <!--@end-->

            <!--@elseif($val->column_type == 'radio')-->
                <!--@if($val->default_value)-->
                    <ul class="radio">
                    <!--@foreach($val->default_value as $v)-->
                        <li><input type="radio" name="{$val->column_name}" value="{$v}" <!--@if($val->value == $v)-->checked="checked"<!--@end-->/>{$v}</li>
                    <!--@end-->
                    </ul>
                <!--@end-->


            <!--// 단일 선택 -->
            <!--@elseif($val->column_type == 'select')-->
                <select name="{$val->column_name}">
                <!--@if($val->default_value)-->
                    <!--@foreach($val->default_value as $v)-->
                        <option value="{$v}" <!--@if($v == $val->value)-->selected="selected"<!--@end-->>{$v}</option>
                    <!--@end-->
                <!--@end-->
                </select>

            <!--// 한국 주소 검색 -->
            <!--@elseif($val->column_type == 'kr_zip')-->
                <div id="zone_address_1_{$val->column_name}" style="display:<!--@if($val->value[0])-->inline<!--@else-->none<!--@end-->;">
                    <input type="text" name="{$val->column_name}" value="{htmlspecialchars($val->value[0])}" class="inputTypeText w400"/>
                    <span class="button"><input type="button" value="{$lang->cmd_cancel}" onclick="doHideKrZipList('{$val->column_name}'); return false;" /></span>
                </div>
                <div id="zone_address_list_{$val->column_name}" style="display:none">
                    <select name="_tmp_address_list_{$val->column_name}" class="w300"></select>
                    <span class="button"><input type="button" value="{$lang->cmd_select}" onclick="doSelectKrZip('{$val->column_name}'); return false;" /></span>
                    <span class="button"><input type="button" value="{$lang->cmd_cancel}" onclick="doHideKrZipList('{$val->column_name}'); return false;" /></span>
                </div>
                <div id="zone_address_search_{$val->column_name}" style="display:<!--@if($val->value[0])-->none<!--@else-->inline<!--@end-->;">
                    <input type="text" name="_tmp_address_search_{$val->column_name}" value="" class="inputTypeText w400" />
                    <span class="button"><input type="button" value="{$lang->cmd_search}" onclick="doSearchKrZip('{$val->column_name}'); return false;" /></span>
                </div>

                <div>
                    <input type="text" name="{$val->column_name}" value="{htmlspecialchars($val->value[1])}" class="inputTypeText w400" />
                </div>

            <!--// 일본 주소 검색 -->
            <!--@elseif($val->column_type == 'jp_zip')-->
                <input type="text" name="{$val->column_name}" value="{$val->value}" class="inputTypeText w400" />

            <!--// 날짜 입력 -->
            <!--@elseif($val->column_type == 'date')-->
                <input type="hidden" name="{$val->column_name}" id="date_{$val->column_name}" value="{$val->value}" />
                <input type="text" class="inputDate" value="{zdate($val->value,"Y-m-d")}" />


            <!--@end-->
            <!--@if($val->description)--><p class="clear">{htmlspecialchars($val->description)}</p><!--@end-->
        </td>
    </tr>
        <!--@end-->
    <!--@end-->
    </table>
    <!--@end-->

    <table cellspacing="0" class="rowTable">
    <tbody>
    <tr>
        <th class="button">
            <span class="button black strong"><input type="submit" value="{$lang->cmd_registration}" accesskey="s" /></span>
            <!--@if($member_srl)-->
            <a href="{getUrl('act','dispMemberAdminInfo')}" class="button"><span>{$lang->cmd_cancel}</span></a>
            <!--@else-->
            <a href="{getUrl('act','dispMemberAdminList')}" class="button"><span>{$lang->cmd_cancel}</span></a>
            <!--@end-->
        </td>
    </tr>
    </tbody>
    </table>
</form>


<script type="text/javascript">
(function($){
    $(function(){
        var option = { gotoCurrent: false,yearRange:'-100:+10', onSelect:function(){

            $(this).prev('input[type="hidden"]').val(this.value.replace(/-/g,""))}
        };
        $.extend(option,$.datepicker.regional['{$lang_type}']);
        $(".inputDate").datepicker(option);
    });
})(jQuery);
</script>
